\hypertarget{classTQueueManager}{
\section{TQueueManager Class Reference}
\label{classTQueueManager}\index{TQueueManager@{TQueueManager}}
}
\hyperlink{classTQueueManager}{TQueueManager} manages the \hyperlink{classTaskDescriptor}{TaskDescriptor} queue for the Worker module and handles communication with \hyperlink{classManager}{Manager} module.  


{\tt \#include $<$tqueuemanager.h$>$}

\subsection*{Public Member Functions}
\begin{CompactItemize}
\item 
\hyperlink{classTQueueManager_b0f5adcf82f02cceed218be3360fe316}{TQueueManager} (void)
\begin{CompactList}\small\item\em Default Constructor. \item\end{CompactList}\item 
\hyperlink{classTQueueManager_ab75520bab380f9d9795c3980905afd4}{TQueueManager} (const \hyperlink{classAddress}{Address} \&addr)
\begin{CompactList}\small\item\em Constructor specifying server \hyperlink{classAddress}{Address}. \item\end{CompactList}\item 
\hypertarget{classTQueueManager_cadbc11f3abb3172b2e3df8d1cddbcd4}{
\hyperlink{classTQueueManager_cadbc11f3abb3172b2e3df8d1cddbcd4}{$\sim$TQueueManager} (void)}
\label{classTQueueManager_cadbc11f3abb3172b2e3df8d1cddbcd4}

\begin{CompactList}\small\item\em Destructor. \item\end{CompactList}\item 
const \hyperlink{classAddress}{Address} \& \hyperlink{classTQueueManager_70d939dccaaf283fee4b48e3574b9193}{getAddr} (void) const 
\begin{CompactList}\small\item\em XXX: Returns the current Worker \hyperlink{classAddress}{Address}. \item\end{CompactList}\item 
void \hyperlink{classTQueueManager_cbfb6412350060b7c3772786dc1d4ce0}{setAddr} (const \hyperlink{classAddress}{Address} \&val)
\begin{CompactList}\small\item\em Sets current Worker \hyperlink{classAddress}{Address} to the provided \hyperlink{classAddress}{Address}. \item\end{CompactList}\item 
int \hyperlink{classTQueueManager_cc2c86ffb7432f601595d07672eb6228}{enqueue} (const \hyperlink{classTaskDescriptor}{TaskDescriptor} \&ts)
\begin{CompactList}\small\item\em Push the provided \hyperlink{classTaskDescriptor}{TaskDescriptor} into the queue. \item\end{CompactList}\item 
\hyperlink{classTaskDescriptor}{TaskDescriptor} \hyperlink{classTQueueManager_7035ae3315cf4bde4516203cba10c4c4}{dequeue} (void)
\begin{CompactList}\small\item\em Pop from the queue the next \hyperlink{classTaskDescriptor}{TaskDescriptor} and returns it. \item\end{CompactList}\item 
\hypertarget{classTQueueManager_3b4a7d1211984196f0809e781f3c4790}{
void \hyperlink{classTQueueManager_3b4a7d1211984196f0809e781f3c4790}{start} (void)}
\label{classTQueueManager_3b4a7d1211984196f0809e781f3c4790}

\begin{CompactList}\small\item\em Create the main thread and join on it. \item\end{CompactList}\end{CompactItemize}


\subsection{Detailed Description}
\hyperlink{classTQueueManager}{TQueueManager} manages the \hyperlink{classTaskDescriptor}{TaskDescriptor} queue for the Worker module and handles communication with \hyperlink{classManager}{Manager} module. 

In order to receive \hyperlink{classTQueueManager_cc2c86ffb7432f601595d07672eb6228}{enqueue()} requests, \hyperlink{classTQueueManager}{TQueueManager} creates an \hyperlink{classUDPServer}{UDPServer}. 

\subsection{Constructor \& Destructor Documentation}
\hypertarget{classTQueueManager_b0f5adcf82f02cceed218be3360fe316}{
\index{TQueueManager@{TQueueManager}!TQueueManager@{TQueueManager}}
\index{TQueueManager@{TQueueManager}!TQueueManager@{TQueueManager}}
\subsubsection[TQueueManager]{\setlength{\rightskip}{0pt plus 5cm}TQueueManager::TQueueManager (void)}}
\label{classTQueueManager_b0f5adcf82f02cceed218be3360fe316}


Default Constructor. 

NOTE: This should not be used. \hypertarget{classTQueueManager_ab75520bab380f9d9795c3980905afd4}{
\index{TQueueManager@{TQueueManager}!TQueueManager@{TQueueManager}}
\index{TQueueManager@{TQueueManager}!TQueueManager@{TQueueManager}}
\subsubsection[TQueueManager]{\setlength{\rightskip}{0pt plus 5cm}TQueueManager::TQueueManager (const {\bf Address} \& {\em addr})}}
\label{classTQueueManager_ab75520bab380f9d9795c3980905afd4}


Constructor specifying server \hyperlink{classAddress}{Address}. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em addr}]Server \hyperlink{classAddress}{Address}. \end{description}
\end{Desc}


\subsection{Member Function Documentation}
\hypertarget{classTQueueManager_70d939dccaaf283fee4b48e3574b9193}{
\index{TQueueManager@{TQueueManager}!getAddr@{getAddr}}
\index{getAddr@{getAddr}!TQueueManager@{TQueueManager}}
\subsubsection[getAddr]{\setlength{\rightskip}{0pt plus 5cm}const {\bf Address} \& TQueueManager::getAddr (void) const}}
\label{classTQueueManager_70d939dccaaf283fee4b48e3574b9193}


XXX: Returns the current Worker \hyperlink{classAddress}{Address}. 

\begin{Desc}
\item[Returns:]A constant reference to private member \_\-addr. \end{Desc}
\hypertarget{classTQueueManager_cbfb6412350060b7c3772786dc1d4ce0}{
\index{TQueueManager@{TQueueManager}!setAddr@{setAddr}}
\index{setAddr@{setAddr}!TQueueManager@{TQueueManager}}
\subsubsection[setAddr]{\setlength{\rightskip}{0pt plus 5cm}void TQueueManager::setAddr (const {\bf Address} \& {\em val})}}
\label{classTQueueManager_cbfb6412350060b7c3772786dc1d4ce0}


Sets current Worker \hyperlink{classAddress}{Address} to the provided \hyperlink{classAddress}{Address}. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em val}]The provided \hyperlink{classAddress}{Address}. \end{description}
\end{Desc}
\hypertarget{classTQueueManager_cc2c86ffb7432f601595d07672eb6228}{
\index{TQueueManager@{TQueueManager}!enqueue@{enqueue}}
\index{enqueue@{enqueue}!TQueueManager@{TQueueManager}}
\subsubsection[enqueue]{\setlength{\rightskip}{0pt plus 5cm}int TQueueManager::enqueue (const {\bf TaskDescriptor} \& {\em ts})}}
\label{classTQueueManager_cc2c86ffb7432f601595d07672eb6228}


Push the provided \hyperlink{classTaskDescriptor}{TaskDescriptor} into the queue. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em ts}]The provided \hyperlink{classTaskDescriptor}{TaskDescriptor}. \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]Zero if operation successful, otherwise an error code. \end{Desc}
\hypertarget{classTQueueManager_7035ae3315cf4bde4516203cba10c4c4}{
\index{TQueueManager@{TQueueManager}!dequeue@{dequeue}}
\index{dequeue@{dequeue}!TQueueManager@{TQueueManager}}
\subsubsection[dequeue]{\setlength{\rightskip}{0pt plus 5cm}{\bf TaskDescriptor} TQueueManager::dequeue (void)}}
\label{classTQueueManager_7035ae3315cf4bde4516203cba10c4c4}


Pop from the queue the next \hyperlink{classTaskDescriptor}{TaskDescriptor} and returns it. 

\begin{Desc}
\item[Returns:]The next \hyperlink{classTaskDescriptor}{TaskDescriptor}. \end{Desc}


The documentation for this class was generated from the following files:\begin{CompactItemize}
\item 
\hyperlink{tqueuemanager_8h}{tqueuemanager.h}\item 
\hyperlink{tqueuemanager_8cpp}{tqueuemanager.cpp}\end{CompactItemize}
